package com.viphuli.common;

/**
 * 全局常量
 * 
 * @author li.li
 *
 */
public class Constants {

	/**
	 * 服务请求结果
	 */
	public static final int REQUEST_RESULT_STATUS_SUCCESS = 0;//返回状态 - 成功

	/**
	 * 系统配置
	 */
	public static final int TOP_SLIDE_DURATION = 5000;//轮转图时间

	/**
	 * Activity result业务码
	 */
	public final static int ACTIVITY_REQUEST_PICK_PHOTO_CODE = 1;//图片选择
	public final static int ACTIVITY_REQUEST_MAP_CODE = 2;//地址选择选择
	public final static int ACTIVITY_REQUEST_TICKET_CODE = 3;//优惠券选择
	public final static int ACTIVITY_REQUEST_REFREASH_CODE = 4;//刷新当前页

	/**
	 * 订购
	 */
	public static final int ORDER_MAX_NUMBER = 99;//订购服务上限
	public static final int ORDER_MIN_NUMBER_PERSON = 1;//订购个人服务下限
	public static final int ORDER_MIN_NUMBER_COMPANY = 5;//订购企业服务下限

	public static final int HOME_SERVICE_NURSE_PERSON = 1;//个人护理
	public static final int HOME_SERVICE_HEALTH_PERSON = 2;//个人体检
	public static final int HOME_SERVICE_CONSULT = 3;//免费咨询
	public static final int HOME_SERVICE_HEALTH_COMPANY = 4;//企业体检

	/**
	 * 性别
	 */
	public static final int SEX_SECRECY = 1;//保密
	public static final int SEX_MALE = 2;//男
	public static final int SEX_FEMALE = 3;//女

	/**
	 * 订单状态
	 */
	public static final int ORDER_STATUS_WAIT_PAY = 1;//订单待付款
	public static final int ORDER_STATUS_WAIT_ACCEPT = 2;//订单待接单
	public static final int ORDER_STATUS_ALREADY_CANCEL = 3;//订单已取消
	public static final int ORDER_STATUS_WAIT_COMMENT = 4;//订单待评价
	public static final int ORDER_STATUS_ALREADY_COMMENT = 5;//订单已评价
	public static final int ORDER_STATUS_WAIT_SERVICE = 6;//订单待服务

	/**
	 * 代金劵状态
	 */
	public static final int TICKET_STATUS_IS_AVAILABLE = 1;//可用
	public static final int TICKET_STATUS_IS_USE = 2;//已使用
	public static final int TICKET_STATUS_IS_UN_AVAILABLE = 3;//不可用
	public static final int TICKET_STATUS_IS_EXPIRES = 4;//已过期
	public static final int TICKET_STATUS_IS_LOCK = 5;//已锁定

	/**
	 * 代金劵是否有效
	 */
	public static final int TICKET_IS_VALID = 1;//代金劵有效
	public static final int TICKET_IS_IN_VALID = 2;//代金劵无效

	/**
	 * 用户类型
	 *
	 */
	public enum UserType {
		normal(1), //普通会员
		nurse(2), //护士
		assessment(3), //评估师
		admin(4), //管理员

		;

		private int value;

		private UserType(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}

	}

	/**
	 * 支付类型
	 */
	public enum PayType {
		weichatPay(1, "微信支付"), //
		aliPay(2, "支付宝支付"), //
		offlinePay(3, "线下支付"), //
		;

		private int payType;
		private String name;

		private PayType(int payType, String name) {
			this.payType = payType;
			this.name = name;
		}

		public int getPayType() {
			return payType;
		}

		public String getName() {
			return name;
		}

		public static PayType getType(int payType) {

			for (PayType t : PayType.values()) {
				if (t.getPayType() == payType) {
					return t;
				}
			}

			return null;
		}

	}

	/**
	 * 在线参数
	 */
	public static final String ONLINE_PARAMS_KEY_SERVICE_TEL = "service_tel";

	/**
	 * 分享类型
	 */
	public enum ShareType {

		weichat_circle(1), //微信-朋友圈
		weichat(2), //微信

		;

		private int platform;

		private ShareType(int platform) {
			this.platform = platform;
		}

		public int getPlatform() {
			return platform;
		}
	}

	/**
	 * 优惠券类型
	 */
	public enum TicketType {

		other(0, "优惠券"), //优惠券(其它未知优惠劵)
		money(1, "代金劵"), //代金劵
		discount(2, "打折劵"), //打折劵

		;

		private int type;
		private String name;

		private TicketType(int type, String name) {
			this.type = type;
			this.name = name;
		}

		public String getName() {
			return name;
		}

		public int getType() {
			return type;
		}

	}

	/**
	 * 客户端行为类型
	 */
	public enum ActionType {
		none(0, "无"), //
		webview(1, "网页"), //
		nurseJoin(2, "护士加入"), //
		privateCustom(3, "私人定制"), //
		serviceList(4, "服务列表"), //
		share(5, "分享"), //

		;

		private int type;
		private String name;

		private ActionType(int type, String name) {
			this.type = type;
			this.name = name;
		}

		public String getName() {
			return name;
		}

		public int getType() {
			return type;
		}

	}

	public static final int SHARE_PLATFORM_WECHAT_CIRCLE = 1;
	public static final int SHARE_PLATFORM_WECHAT_FRIEND = 2;

}
